using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for NHACUNGCAP.
     /// </summary>
     public class NHACUNGCAP
    {
              private Int32 _MANHACUNGCAP;
      private string _TENNHACUNGCAP;
      private string _DIACHI;
      private string _DIENTHOAI;
      private string _DIDONG;
      private string _NGUOIDAIDIEN;
      private string _EMAIL;
      private bool _THEODOI;
      private bool _ISDELETE;
      private string _GHICHU;
      private HOADONNHAPKHOList _listHOADONNHAPKHO;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMANHACUNGCAPNullable
      { get { return false;  } }
      public Int32 MANHACUNGCAP
      {
         get { return _MANHACUNGCAP; }
         set { _MANHACUNGCAP = value; }
      }
      public bool IsTENNHACUNGCAPNullable
      { get { return true;  } }
      public string TENNHACUNGCAP
      {
         get { return _TENNHACUNGCAP;  }
         set { _TENNHACUNGCAP = value; }
      }
      public bool IsDIACHINullable
      { get { return true;  } }
      public string DIACHI
      {
         get { return _DIACHI;  }
         set { _DIACHI = value; }
      }
      public bool IsDIENTHOAINullable
      { get { return true;  } }
      public string DIENTHOAI
      {
         get { return _DIENTHOAI;  }
         set { _DIENTHOAI = value; }
      }
      public bool IsDIDONGNullable
      { get { return true;  } }
      public string DIDONG
      {
         get { return _DIDONG;  }
         set { _DIDONG = value; }
      }
      public bool IsNGUOIDAIDIENNullable
      { get { return true;  } }
      public string NGUOIDAIDIEN
      {
         get { return _NGUOIDAIDIEN;  }
         set { _NGUOIDAIDIEN = value; }
      }
      public bool IsEMAILNullable
      { get { return true;  } }
      public string EMAIL
      {
         get { return _EMAIL;  }
         set { _EMAIL = value; }
      }
      public bool IsTHEODOINullable
      { get { return true;  } }
      public bool THEODOI
      {
         get { return _THEODOI;  }
         set { _THEODOI = value; }
      }
      public bool IsISDELETENullable
      { get { return true;  } }
      public bool ISDELETE
      {
         get { return _ISDELETE;  }
         set { _ISDELETE = value; }
      }
      public bool IsGHICHUNullable
      { get { return true;  } }
      public string GHICHU
      {
         get { return _GHICHU;  }
         set { _GHICHU = value; }
      }
public HOADONNHAPKHOList HOADONNHAPKHOList 
{ 
	get { return _listHOADONNHAPKHO; }
	set { _listHOADONNHAPKHO = value;}
}

        #endregion

        #region Constructors
        public NHACUNGCAP()
        {
            Reset();
        }
        public NHACUNGCAP(NHACUNGCAP obj)
        {
            	this._MANHACUNGCAP = obj.MANHACUNGCAP;
	this._TENNHACUNGCAP = obj.TENNHACUNGCAP;
	this._DIACHI = obj.DIACHI;
	this._DIENTHOAI = obj.DIENTHOAI;
	this._DIDONG = obj.DIDONG;
	this._NGUOIDAIDIEN = obj.NGUOIDAIDIEN;
	this._EMAIL = obj.EMAIL;
	this._THEODOI = obj.THEODOI;
	this._ISDELETE = obj.ISDELETE;
	this._GHICHU = obj.GHICHU;
        }
        #endregion

        public void Reset()
        {
                     _MANHACUNGCAP = EmptyValues.v_Int32;
         _TENNHACUNGCAP = EmptyValues.v_string;
         _DIACHI = EmptyValues.v_string;
         _DIENTHOAI = EmptyValues.v_string;
         _DIDONG = EmptyValues.v_string;
         _NGUOIDAIDIEN = EmptyValues.v_string;
         _EMAIL = EmptyValues.v_string;
         _THEODOI = EmptyValues.v_bool;
         _ISDELETE = EmptyValues.v_bool;
         _GHICHU = EmptyValues.v_string;
	_listHOADONNHAPKHO = null;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MANHACUNGCAP"] is DBNull))
		{
			obj.MANHACUNGCAP = (Int32)reader["MANHACUNGCAP"];
		}
                if(!(reader["TENNHACUNGCAP"] is DBNull))
		{
			obj.TENNHACUNGCAP = (string)reader["TENNHACUNGCAP"];
		}
                if(!(reader["DIACHI"] is DBNull))
		{
			obj.DIACHI = (string)reader["DIACHI"];
		}
                if(!(reader["DIENTHOAI"] is DBNull))
		{
			obj.DIENTHOAI = (string)reader["DIENTHOAI"];
		}
                if(!(reader["DIDONG"] is DBNull))
		{
			obj.DIDONG = (string)reader["DIDONG"];
		}
                if(!(reader["NGUOIDAIDIEN"] is DBNull))
		{
			obj.NGUOIDAIDIEN = (string)reader["NGUOIDAIDIEN"];
		}
                if(!(reader["EMAIL"] is DBNull))
		{
			obj.EMAIL = (string)reader["EMAIL"];
		}
                if(!(reader["THEODOI"] is DBNull))
		{
			obj.THEODOI = (bool)reader["THEODOI"];
		}
                if(!(reader["ISDELETE"] is DBNull))
		{
			obj.ISDELETE = (bool)reader["ISDELETE"];
		}
                if(!(reader["GHICHU"] is DBNull))
		{
			obj.GHICHU = (string)reader["GHICHU"];
		}
//            _MANHACUNGCAP = (reader["MANHACUNGCAP"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MANHACUNGCAP"];
//            _TENNHACUNGCAP = (reader["TENNHACUNGCAP"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["TENNHACUNGCAP"];
//            _DIACHI = (reader["DIACHI"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIACHI"];
//            _DIENTHOAI = (reader["DIENTHOAI"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIENTHOAI"];
//            _DIDONG = (reader["DIDONG"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIDONG"];
//            _NGUOIDAIDIEN = (reader["NGUOIDAIDIEN"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["NGUOIDAIDIEN"];
//            _EMAIL = (reader["EMAIL"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["EMAIL"];
//            _THEODOI = (reader["THEODOI"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["THEODOI"];
//            _ISDELETE = (reader["ISDELETE"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISDELETE"];
//            _GHICHU = (reader["GHICHU"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["GHICHU"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 MANHACUNGCAP, string TENNHACUNGCAP, string DIACHI, string DIENTHOAI, string DIDONG, string NGUOIDAIDIEN, string EMAIL, bool THEODOI, bool ISDELETE, string GHICHU)
        {
                     this._MANHACUNGCAP = MANHACUNGCAP;
         this._TENNHACUNGCAP = TENNHACUNGCAP;
         this._DIACHI = DIACHI;
         this._DIENTHOAI = DIENTHOAI;
         this._DIDONG = DIDONG;
         this._NGUOIDAIDIEN = NGUOIDAIDIEN;
         this._EMAIL = EMAIL;
         this._THEODOI = THEODOI;
         this._ISDELETE = ISDELETE;
         this._GHICHU = GHICHU;
        }
    }
}